package com.imooc.utils;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

/**
 * Created by Administrator on 2019/3/28.
 */
public class JsonUtil {

    public static String toJson(Object object) {
        GsonBuilder gsonbuilder = new GsonBuilder();
        gsonbuilder.setPrettyPrinting();
        Gson gson = gsonbuilder.create();
        return gson.toJson(object);
    }
}
